<?
class Residence extends genericClass{
	function __construct($Mod,$Tab) {
		genericClass::__construct($Mod,$Tab);
	}
	function Importer($File){
		$t[] ="START IMPORT ".$File;
		$t[] ="INCLUDE EXCEL READER LIBRAIRIES";
		require_once("Class/Lib/ExcelReader/reader.php");
		$data = new Spreadsheet_Excel_Reader();
		//Utilisation du module mb pour la conversion en utf8
		$data->setUTFEncoder('mb');
		//On demarre la conversion à l'offset 0
		 //$data->setRowColOffset(0);
		//Lecture du fichier
		$data->read($File);
		echo "<table border='1'>";
		for ($i = 1; $i <= $data->sheets[0]['numRows']; $i++) {
			echo "<tr>";
			for ($j = 1; $j <= $data->sheets[0]['numCols']; $j++) {
				echo "<td>".$data->sheets[0]['cells'][$i][$j]."</td>";
			}
			echo "</tr>";
		}
		echo "</table>";
		$t[] ="EXCEL FILE READ OK";
		return $t;
	}
}
?>